#if !defined(ximera_audio_openal_sound_hpp)
#define ximera_audio_openal_sound_hpp

// -----------------------------------------------------------

#include <ximera/audio/isound.hpp>
#include <ximera/audio/openal/sounddata.hpp>

namespace ximera { namespace audio { namespace openal
{
    class XIMERA_PLUGIN_API Sound : public ISound
    {
    public:
        Sound();
        virtual ~Sound();

        virtual SharedPtr<ISoundData> const& soundData() const;
        virtual void soundData(SharedPtr<ISoundData> const& data);
        virtual void soundData(ISoundData* data);

        virtual math::Vector3 position() const;
        virtual void position(math::Vector3 const& pos);

        virtual math::Vector3 velocity() const;
        virtual void velocity(math::Vector3 const& vel);

        virtual LoopMode loopMode() const;
        virtual void loopMode(LoopMode mode);

        virtual void play();
        virtual void stop();
        virtual void pause();

    private:
        ALuint _source;
        SharedPtr<ISoundData> _soundData;

        math::Vector3 _position;
        math::Vector3 _velocity;
    };
}}}

// -----------------------------------------------------------

#endif
